using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class OBj_Tables_RecCount_vMap : EntityTypeConfiguration<OBj_Tables_RecCount_v>
    {
        public OBj_Tables_RecCount_vMap()
        {
            // Primary Key
            this.HasKey(t => t.Table_Name);

            // Properties
            this.Property(t => t.Table_Name)
                .IsRequired()
                .HasMaxLength(128);

            // Table & Column Mappings
            this.ToTable("OBj_Tables_RecCount_v");
            this.Property(t => t.Table_Name).HasColumnName("Table_Name");
            this.Property(t => t.Record_Count).HasColumnName("Record_Count");
        }
    }
}
